package com.my12306.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.train.model.entity.DecreaseEntity;
import com.my12306.train.model.vo.DecreaseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 递远递减率信息
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
@Mapper
public interface DecreaseDao extends BaseMapper<DecreaseEntity> {

    /**
     *分页查询
     * @param pageVo
     * @param logicDelete
     * @return
     */
    List<DecreaseVO> queryTicketDecreaseByPage(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);

    /**
     * 查询总数据量
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryTicketDecreaseCount(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);

    /**
     * 根据
     * @param id
     * @param logicDelete
     * @return
     */
    DecreaseVO queryTicketDecreaseById(@Param("id") Long id, @Param("logicDelete") Integer logicDelete) ;

    void deleteBatchTicketDecreaseByIds(@Param("list") List<Long> ids, @Param("logicDelete") Integer logicDelete);

    /**
     * 根据票种id
     *
     * @param rateId
     * @param logicDelete
     * @return
     */
    List<DecreaseVO> queryTicketDecreaseByRateId(@Param("rateId") Long  rateId, @Param("logicDelete") Integer logicDelete);

    /**
     * 保存
     * @param decrease
     */
    void saveTickDecrease(@Param("decrease") DecreaseEntity decrease);
}
